{template 'web/common/common'}
{template 'web/home/navbar'}
<link rel="stylesheet" type="text/css" href="../addons/kundian_farm/resource/css/style.css" />

<div class="panel panel-success">
    <div class="panel-heading">
        <h3 class="panel-title">
           首页基本配置
        </h3>
    </div>

    <div class="panel-body">
        <form id="sign-form" class="form-horizontal" role="form" method="post" action="{url 'site/entry/home',array('m'=>'kundian_farm','op'=>'home_set_save','version_id'=>$_GPC['version_id'])}" name="submit" style="padding: 20px 0;">
            <div class="form-group">
                <label  class="col-sm-2 control-label">首页标题设置</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="home_title" value="{$list['home_title']}">
                </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label">首页标题链接地址</label>
                <div class="col-sm-8">
                    <select name="home_title_jump_url" class="form-control">
                        <option value="">请选择</option>
                        <option value="shop/Adopt/index" <?php if($list['home_title_jump_url']=='shop/Adopt/index'){echo 'selected';} ?> >家畜领养</option>
                        <option value="shop/integral/index/index" <?php if($list['home_title_jump_url']=='shop/integral/index/index'){echo 'selected';} ?> >农场签到</option>
                        <option value="user/land/selectionLands/index" <?php if($list['home_title_jump_url']=='user/land/selectionLands/index'){echo 'selected';} ?> >农田选租 </option>
                        <option value="HomePage/live/index" <?php if($list['home_title_jump_url']=='HomePage/live/index'){echo 'selected';} ?> >农场监控 </option>
                        <option value="shop/integral/exchange/index" <?php if($list['home_title_jump_url']=='shop/integral/exchange/index'){echo 'selected';} ?> >积分商城 </option>
                        <option value="shop/Group/index/index" <?php if($list['home_title_jump_url']=='shop/Group/index/index'){echo 'selected';} ?> >组团商城 </option>
                        <option value="HomePage/about/index" <?php if($list['home_title_jump_url']=='HomePage/about/index'){echo 'selected';} ?> >关于我们 </option>
                        <option value="user/coupon/index/index" <?php if($list['home_title_jump_url']=='user/coupon/index/index'){echo 'selected';} ?> >领券中心 </option>
                        <option value="user/addCard/index" <?php if($list['home_title_jump_url']=='user/addCard/index'){echo 'selected';} ?> >兑换卡 </option>
                        <option value="shop/index/index" <?php if($list['home_title_jump_url']=='shop/index/index'){echo 'selected';} ?> >普通商城 </option>
                        <option value="shop/VeterinaryIntroduce/index" <?php if($list['home_title_jump_url']=='shop/VeterinaryIntroduce/index'){echo 'selected';} ?> >团队管理 </option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label">首页顶部标题设置</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="bar_title" value="{$list['bar_title']}">
                </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label">是否开启优惠券板块</label>
                <div class="col-sm-8">
                    <div class="col-sm-8">
                        {if $list['is_open_coupon']==1}
                        <input type="checkbox" checked class="js-switch" value="1" name="is_open_coupon">
                        {else}
                        <input type="checkbox" class="js-switch" name="is_open_coupon" value="1">
                        {/if}
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label  class="col-sm-2 control-label">首页优惠券显示数量</label>
                <div class="col-sm-8">
                    <input type="number" class="form-control" name="coupon_count" min="0" value="{$list['coupon_count']}">
                    <span style="color:gray;">优惠券数量默认显示4张，若要在首页显示全部优惠券请填写0;显示顺序为顺序依次排序</span>
                </div>
            </div>

            <div class="form-group">

                <div class="col-sm-offset-2 col-sm-10">
                    <button type="submit" class="btn btn-primary">保存</button>
                    <!--<a class="btn btn-default" href="{url 'site/entry/system',array('m'=>'kundian_farm')}">返回</a>-->
                </div>
            </div>
        </form>
    </div>
</div>
